<?
global $base_dir;
$base_dir='../';

include_once($base_dir."inc/inc_connect.php");		//通用函数包含文件
include_once($base_dir."func/index_func.php");

if(!empty($_SESSION['userid'])) //已登录状态
{
	echo 'document.write("您好，'.$_SESSION['username'].'！&nbsp;&nbsp;&nbsp;<a href=\"'.WEBDOMAIN.'/login.php?act=logout\">退出</a>&nbsp;&nbsp;&nbsp;<a href=\"'.WEBDOMAIN.'/user/home/\" target=\"_blank\">用户中心</a>");';
}
else			//未登录状态
{
	echo 'document.write("<span>您好，欢迎来易配网！<a href=\"'.WEBDOMAIN.'/login.php?url="+escape(document.location.href)+"\">请登录</a></span>&nbsp;&nbsp;<a href=\"'.WEBDOMAIN.'/register.php\">免费注册</a>");';
}
?>